const express = require("express");
const router = express.Router();
router.get("/get", (req, res) => {
  const query = req.query;
  res.send(query);
});
router.post("/post", (req, res) => {
  const body = req.body;
  res.send(body);
});
router.delete("/delete", (req, res) => {
  res.send({
    code: 200,
    msg: "delete请求会发起2次请求 一次options请求 一次真正的delete请求",
    data: {
      name: "delete",
      age: 20,
    },
    success: true,
  });
});
module.exports = router;
